/* Copyright (C) 2011  Chris Mueller <ruunhb@googlemail.com>
 *
 * This file is part of the Liquid Programming Language
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef LIQUID_NODEVIZ_TREEGENERATOR
#define LIQUID_NODEVIZ_TREEGENERATOR

#include "base.h"
#include <stdio.h>
#include <graphviz/gvc.h>
#include <glib/gnode.h>

G_BEGIN_DECLS

struct TreeGenerator;
struct TreeViz;

void lq_nodeviz_agnode_label(Agnode_t* n, gchar* title, gchar* name);

struct TreeGenerator* lq_nodeviz_treegen_new(void);
void lq_nodeviz_treegen_free(struct TreeGenerator* gen);

void lq_nodeviz_treegen_read(struct TreeGenerator* gen, FILE* stream);

Agraph_t* lq_nodeviz_treegen_graph(struct TreeGenerator* gen, const TreeViz* viz);
Agnode_t* lq_nodeviz_treegen_agnode_new(Agraph_t* g, GNode* node, const TreeViz* viz);

G_END_DECLS

#endif
